.class Lrexsee/keyboard/TouchBallWidget$1;
.super Ljava/lang/Object;
.source "TouchBallWidget.java"

# interfaces
.implements Landroid/view/View$OnTouchListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/keyboard/TouchBallWidget;-><init>(Landroid/content/Context;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Lrexsee/keyboard/TouchBallDialog;Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/keyboard/TouchBallWidget;


# direct methods
.method constructor <init>(Lrexsee/keyboard/TouchBallWidget;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    .line 34
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .locals 9
    .param p1, "v"    # Landroid/view/View;
    .param p2, "event"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v4, 0x0

    const/4 v8, 0x1

    const/4 v7, 0x0

    .line 37
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    .line 38
    .local v0, "a":I
    if-nez v0, :cond_1

    .line 39
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v4

    float-to-int v4, v4

    invoke-static {v3, v4}, Lrexsee/keyboard/TouchBallWidget;->access$0(Lrexsee/keyboard/TouchBallWidget;I)V

    .line 40
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F

    move-result v4

    float-to-int v4, v4

    invoke-static {v3, v4}, Lrexsee/keyboard/TouchBallWidget;->access$1(Lrexsee/keyboard/TouchBallWidget;I)V

    .line 41
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    const/16 v4, 0xff

    invoke-static {v3, v4}, Lrexsee/keyboard/TouchBallWidget;->access$2(Lrexsee/keyboard/TouchBallWidget;I)V

    .line 42
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-virtual {v3}, Lrexsee/keyboard/TouchBallWidget;->postInvalidate()V

    .line 43
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-static {v3, v8}, Lrexsee/keyboard/TouchBallWidget;->access$3(Lrexsee/keyboard/TouchBallWidget;Z)V

    .line 74
    :cond_0
    :goto_0
    return v7

    .line 44
    :cond_1
    const/4 v3, 0x2

    if-ne v0, v3, :cond_4

    .line 45
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    float-to-int v1, v3

    .line 46
    .local v1, "cX":I
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F

    move-result v3

    float-to-int v2, v3

    .line 47
    .local v2, "cY":I
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    iget-object v4, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->x:Ljava/lang/Integer;
    invoke-static {v4}, Lrexsee/keyboard/TouchBallWidget;->access$4(Lrexsee/keyboard/TouchBallWidget;)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v4

    add-int/2addr v4, v1

    iget-object v5, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mX:I
    invoke-static {v5}, Lrexsee/keyboard/TouchBallWidget;->access$5(Lrexsee/keyboard/TouchBallWidget;)I

    move-result v5

    sub-int/2addr v4, v5

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-static {v3, v4}, Lrexsee/keyboard/TouchBallWidget;->access$6(Lrexsee/keyboard/TouchBallWidget;Ljava/lang/Integer;)V

    .line 48
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    iget-object v4, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->y:Ljava/lang/Integer;
    invoke-static {v4}, Lrexsee/keyboard/TouchBallWidget;->access$7(Lrexsee/keyboard/TouchBallWidget;)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v4

    add-int/2addr v4, v2

    iget-object v5, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mY:I
    invoke-static {v5}, Lrexsee/keyboard/TouchBallWidget;->access$8(Lrexsee/keyboard/TouchBallWidget;)I

    move-result v5

    sub-int/2addr v4, v5

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-static {v3, v4}, Lrexsee/keyboard/TouchBallWidget;->access$9(Lrexsee/keyboard/TouchBallWidget;Ljava/lang/Integer;)V

    .line 49
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-static {v3, v1}, Lrexsee/keyboard/TouchBallWidget;->access$0(Lrexsee/keyboard/TouchBallWidget;I)V

    .line 50
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-static {v3, v2}, Lrexsee/keyboard/TouchBallWidget;->access$1(Lrexsee/keyboard/TouchBallWidget;I)V

    .line 51
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mOnTouchBallMoveListener:Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;
    invoke-static {v3}, Lrexsee/keyboard/TouchBallWidget;->access$10(Lrexsee/keyboard/TouchBallWidget;)Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;

    move-result-object v3

    if-eqz v3, :cond_2

    .line 52
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mOnTouchBallMoveListener:Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;
    invoke-static {v3}, Lrexsee/keyboard/TouchBallWidget;->access$10(Lrexsee/keyboard/TouchBallWidget;)Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;

    move-result-object v3

    iget-object v4, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mX:I
    invoke-static {v4}, Lrexsee/keyboard/TouchBallWidget;->access$5(Lrexsee/keyboard/TouchBallWidget;)I

    move-result v4

    iget-object v5, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-virtual {v5}, Lrexsee/keyboard/TouchBallWidget;->getWidth()I

    move-result v5

    div-int/lit8 v5, v5, 0x2

    int-to-float v5, v5

    invoke-static {v5}, Ljava/lang/Math;->round(F)I

    move-result v5

    sub-int/2addr v4, v5

    iget-object v5, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mY:I
    invoke-static {v5}, Lrexsee/keyboard/TouchBallWidget;->access$8(Lrexsee/keyboard/TouchBallWidget;)I

    move-result v5

    iget-object v6, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-virtual {v6}, Lrexsee/keyboard/TouchBallWidget;->getHeight()I

    move-result v6

    div-int/lit8 v6, v6, 0x2

    int-to-float v6, v6

    invoke-static {v6}, Ljava/lang/Math;->round(F)I

    move-result v6

    sub-int/2addr v5, v6

    invoke-virtual {v3, v4, v5}, Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;->run(II)V

    .line 54
    :cond_2
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-virtual {v3}, Lrexsee/keyboard/TouchBallWidget;->postInvalidate()V

    .line 55
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->moving:Z
    invoke-static {v3}, Lrexsee/keyboard/TouchBallWidget;->access$11(Lrexsee/keyboard/TouchBallWidget;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 56
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getPointerCount()I

    move-result v3

    if-ne v3, v8, :cond_3

    .line 57
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # invokes: Lrexsee/keyboard/TouchBallWidget;->moveDialog()V
    invoke-static {v3}, Lrexsee/keyboard/TouchBallWidget;->access$12(Lrexsee/keyboard/TouchBallWidget;)V

    goto/16 :goto_0

    .line 59
    :cond_3
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-static {v3, v7}, Lrexsee/keyboard/TouchBallWidget;->access$3(Lrexsee/keyboard/TouchBallWidget;Z)V

    goto/16 :goto_0

    .line 62
    .end local v1    # "cX":I
    .end local v2    # "cY":I
    :cond_4
    if-ne v0, v8, :cond_0

    .line 63
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mOnTouchBallMoveListener:Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;
    invoke-static {v3}, Lrexsee/keyboard/TouchBallWidget;->access$10(Lrexsee/keyboard/TouchBallWidget;)Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;

    move-result-object v3

    if-eqz v3, :cond_5

    .line 64
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mOnTouchBallMoveListener:Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;
    invoke-static {v3}, Lrexsee/keyboard/TouchBallWidget;->access$10(Lrexsee/keyboard/TouchBallWidget;)Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;

    move-result-object v3

    invoke-virtual {v3, v7, v7}, Lrexsee/keyboard/TouchBallWidget$OnTouchBallMoveListener;->run(II)V

    .line 66
    :cond_5
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-static {v3, v4}, Lrexsee/keyboard/TouchBallWidget;->access$6(Lrexsee/keyboard/TouchBallWidget;Ljava/lang/Integer;)V

    .line 67
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-static {v3, v4}, Lrexsee/keyboard/TouchBallWidget;->access$9(Lrexsee/keyboard/TouchBallWidget;Ljava/lang/Integer;)V

    .line 68
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mDialog:Lrexsee/keyboard/TouchBallDialog;
    invoke-static {v3}, Lrexsee/keyboard/TouchBallWidget;->access$13(Lrexsee/keyboard/TouchBallWidget;)Lrexsee/keyboard/TouchBallDialog;

    move-result-object v3

    if-eqz v3, :cond_6

    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    iget-object v4, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    # getter for: Lrexsee/keyboard/TouchBallWidget;->mDialog:Lrexsee/keyboard/TouchBallDialog;
    invoke-static {v4}, Lrexsee/keyboard/TouchBallWidget;->access$13(Lrexsee/keyboard/TouchBallWidget;)Lrexsee/keyboard/TouchBallDialog;

    move-result-object v4

    iget-object v4, v4, Lrexsee/keyboard/TouchBallDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v4}, Lrexsee/core/style/StyleSheet;->getIconAlpha()I

    move-result v4

    invoke-static {v3, v4}, Lrexsee/keyboard/TouchBallWidget;->access$2(Lrexsee/keyboard/TouchBallWidget;I)V

    .line 69
    :cond_6
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-virtual {v3}, Lrexsee/keyboard/TouchBallWidget;->postInvalidate()V

    .line 70
    iget-object v3, p0, Lrexsee/keyboard/TouchBallWidget$1;->this$0:Lrexsee/keyboard/TouchBallWidget;

    invoke-static {v3, v7}, Lrexsee/keyboard/TouchBallWidget;->access$3(Lrexsee/keyboard/TouchBallWidget;Z)V

    goto/16 :goto_0
.end method
